package com.yuanqunsoft.alimigration.service.impl;

import java.util.List;

import com.yuanqunsoft.alimigration.dao.IRemediationDao;
import com.yuanqunsoft.alimigration.model.Remediation;
import com.yuanqunsoft.alimigration.model.Rule;
import com.yuanqunsoft.alimigration.service.IRemediationService;

public class RemediationServiceImpl implements IRemediationService {

    private IRemediationDao remediationDao;

    @Override
    public boolean addRemediation(Remediation re) {
        // TODO Auto-generated method stub
        return remediationDao.save(re);
    }

    @Override
    public boolean deleteRemediation(Remediation re) {
        // TODO Auto-generated method stub
        return remediationDao.delete(re);
    }

    @Override
    public boolean updateRemediation(Remediation re) {
        // TODO Auto-generated method stub
        return remediationDao.update(re);
    }

    @Override
    public List<Remediation> getAllRemediations() {
        // TODO Auto-generated method stub
        return remediationDao.getAllRemediations();
    }

    @Override
    public List<Rule> getRuleByRemediationId(int id) {
        // TODO Auto-generated method stub
        return remediationDao.getRuleByRemediationId(id);
    }

    @Override
    public Remediation getRemediationById(int id) {
        // TODO Auto-generated method stub
        return remediationDao.getRemediationById(id);
    }

    @Override
    public List<Remediation> queryPage(int currentPge, int pageSize) {
        // TODO Auto-generated method stub
        return remediationDao.queryPage(currentPge, pageSize);
    }

    @Override
    public int getAllPage() {
        // TODO Auto-generated method stub
        return remediationDao.getAllPage();
    }

    public IRemediationDao getRemediationDao() {
        return remediationDao;
    }

    public void setRemediationDao(IRemediationDao remediationDao) {
        this.remediationDao = remediationDao;
    }

}
